<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		
		<style type="text/css">
			*{
				margin: 0px ;
				padding: 0px;
			}
			.box{
				width: 1226px;
				height: 460px;
				position: relative;
				border: 5px solid red;
				overflow: hidden;
			}
			.imgbox{
				width: 6130px;
				height: 460px;
				position: absolute;
				top: 0px;
				left: 0px;
			}
			.imgbox img{
				width: 1226px;
				height: 460px;
				float: left;
			}
		</style>
		
		<script type="text/javascript">
			
			$(function(){
				
				
//				定义一个总管变量
				var num=0;
//				设置定时器
				setInterval(function(){
//					变量自增
					num++;
//					判断
					if(num>4){
//						当到达最后一张图时  让他书剑跳到第一张图上
						$('.imgbox').css('left','0px');
//						让他滑到第二张图上
						num=1;
					}
					
					$('.imgbox').animate({'left':-1226*num+'px'},300)
				},2000)
				
				
			})
		</script>
	</head>
	<body>
		
		<div class="box">
			<div class="imgbox">
				<img src="img/m1.jpg"/>
				<img src="img/m2.jpg"/>
				<img src="img/m3.jpg"/>
				<img src="img/m4.jpg"/>
				<img src="img/m1.jpg"/>
			</div>
		</div>
		
	</body>
</html>
